
#include "vfs.h"

#define HASHSIZE 62


typedef struct iFileDesc
{
	char name[fileNameLength];
	long offset;
	struct iFileDesc *next;
}iFileDesc , *ifd;


typedef struct searchRes
{
	char name[fileNameLength];
	char address[addressLength];
	struct searchRes *next;
}serRes , *sr;


ifd hashTable[HASHSIZE];


//function definitions
void create_hash() ; // initializing the hash table

sr addInSearch(sr searchList , char *name , char *address);

unsigned int hashFunction(char *fName);

void insertFile(char* name , long offset);

void traverseFile();

int searchHashFile(char *fName,char* outputFileName);

void deleteFile(char *fName , long offset);

int searchAndWrite(sr searchList,char* outputFileName);

